<template>
	<view>
		<view class="header">
			<u-navbar title="订单填写" back-icon-size='44' :background="background" title-color="#FFFFFF"
				:border-bottom='false' back-icon-color='#FFFFFF'>
				<view slot='right' style="padding-right: 28rpx;color: #FFFFFF;">
					退改说明
				</view>
			</u-navbar>
		</view>
		<view class="container">
			<view class="transBox">
				<view class="trans">
					<view class="left">
						<view class="left-item" style="margin-bottom: 24rpx;">
							<view class="info">
								<view class="sort">
									1
								</view>
								<view class="date">
									02-10
								</view>
								<view class="address">
									深圳北 - 长沙南
								</view>
							</view>
							<view class="price">
								二等座 ¥388.5
							</view>
						</view>
						<view class="left-item">
							<view class="info">
								<view class="sort">
									2
								</view>
								<view class="date">
									02-10
								</view>
								<view class="address">
									长沙 - 常德
								</view>
							</view>
							<view class="price">
								二等座 ¥388.5
							</view>
						</view>
					</view>
					<view class="right" @click="showPopup=true">
						<u-icon name="arrow-right" color="#666666" size="28"></u-icon>
					</view>
				</view>
				<view class="line"></view>
				<view class="tip">
					不同车站中转，请注意换乘时间以免耽误行程
				</view>
				<view class="tip1">
					若遇余票不足等情况，<text style="color: #FB4F4B;">可能会第二程出票失败</text>，敬请谅解， 建议您补买其他车次活上车补票
				</view>
			</view>
			
			<view class="passer">
				<view class="passer-ul">
					<view class="passer-li">
						<view class="del">
							<u-icon name="minus-circle" color="#FB4F4B" size="36"></u-icon>
						</view>
						<view class="peoInfo">
							<view class="name">
								<view class="name-tit">
									小桌子
								</view>
								<view class="type">
									成人票
								</view>
							</view>
							<view class="idnum">
								二代身份证 123568 ******** 2356
							</view>
						</view>
					</view>
				</view>
				<view class="addpasser" @click="navTo('./selPass')">
					<u-icon name="plus-circle" color="#3587F7" size="36"></u-icon>添加乘客(成人、学生、儿童）
				</view>
			</view>
		
			<view class="inputBox">
				<view class="label">
					手机号码
				</view>
				<view class="input">
					<text>＋86</text>
					<input type="text" value="" placeholder="135 **** 5698" />
				</view>
				<view class="right">
					<image src="../../../static/imgs/txl.png" mode=""></image>
				</view>
			</view>
			
			<view class="inputBox">
				<view class="label">
					在线选座
				</view>
				<view class="input">
					支持选座服务
				</view>
				<view class="right" @click="showSeat=true">
					<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
				</view>
			</view>
			
			<view class="inputBox">
				<view class="label">
					费用明细
				</view>
				<view class="input">
					<input type="text" value="" placeholder="" v-model="money" />
				</view>
				<view class="right">
					<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
				</view>
			</view>
			
			<view class="trainTip">
				订单提交成功表示已阅读并同意<text style="color: #5E75AD;">火车票服务协议，</text><text style="color: #5E75AD;" @click="navTo('./transInfo')">中转预定须知</text>
			</view>
		</view>
		
		<view class="reserve">
			<view class="btn">
				立即预定
			</view>
		</view>
		
		<u-popup v-model="showPopup" mode="center" border-radius="16">
			<view class="transPop">
				<view class="top">
					<view class="left">
						<text>02-10</text>
						<text style="margin: 0 10rpx;">周三</text>
						<text>深圳北 - 长沙南</text>
					</view>
					<view class="right">
						全程6时50分
					</view>
				</view>
				<view class="trans-li">
					<view class="step">
						1
					</view>
					<view class="dra">
						<view class="date">
							02月10日
						</view>
						<view class="time">
							14:00
						</view>
						<view class="station">
							深圳北
						</view>
					</view>
					<view class="mid">
						<view class="longtime">
							12时55分
						</view>
						<image src="../../../static/imgs/airTo.png" mode=""></image>
						<view class="train">
							G10101
						</view>
					</view>
					<view class="ari">
						<view class="date">
							02月10日
						</view>
						<view class="time">
							14:00
						</view>
						<view class="station">
							深圳北
						</view>
					</view>
				</view>
				<view class="trans-text">
					同城异站中转，需换乘，停留1时35分
				</view>
				<view class="trans-li">
					<view class="step">
						2
					</view>
					<view class="dra">
						<view class="date">
							02月10日
						</view>
						<view class="time">
							14:00
						</view>
						<view class="station">
							深圳北
						</view>
					</view>
					<view class="mid">
						<view class="longtime">
							12时55分
						</view>
						<image src="../../../static/imgs/airTo.png" mode=""></image>
						<view class="train">
							G10101
						</view>
					</view>
					<view class="ari">
						<view class="date">
							02月10日
						</view>
						<view class="time">
							14:00
						</view>
						<view class="station">
							深圳北
						</view>
					</view>
				</view>
			</view>
		</u-popup>
		
		<u-popup v-model="showSeat" mode="bottom" border-radius="16" closeable close-icon-pos='top-left'>
			<view class="seatPop">
				<view class="title">
					<text>在线选座</text>
					<text class='sub' style="float: right;">确定</text>
				</view>
				<view class="tip">
					优先按指定坐席出票，若指定坐席无票，将转购其他坐席
				</view>
				<view class="route">
					<view class="label">
						第一程 G1010
					</view>
					<view class="route-item">
						<view class="tipBox">
							靠 窗
						</view>
						<view class="seat" :style="{backgroundImage:seat == 0?'url(../../../static/imgs/seatx.png)':'../../../static/imgs/seat.png'}">
							A
						</view>
						<view class="seat">
							B
						</view>
						<view class="seat">
							C
						</view>
						<view class="tipBox">
							过 道
						</view>
						<view class="seat">
							D
						</view>
						<view class="seat">
							F
						</view>
						<view class="tipBox">
							靠 窗
						</view>
					</view>
				</view>
				<view class="route">
					<view class="label">
						第二程 G1010
					</view>
					<view class="route-item">
						<view class="tipBox">
							靠 窗
						</view>
						<view class="seat">
							A
						</view>
						<view class="seat">
							B
						</view>
						<view class="seat">
							C
						</view>
						<view class="tipBox">
							过 道
						</view>
						<view class="seat">
							D
						</view>
						<view class="seat">
							F
						</view>
						<view class="tipBox">
							靠 窗
						</view>
					</view>
				</view>
			</view>
		</u-popup>
		
	</view>
</template>

<script>
	export default {
		data(){
			return {
				showSeat:false,
				showPopup:false,
				money:'¥100',
				background: {
					backgroundColor: 'rgba(255,255,255,0)'
				},
				seat:0,
			}
		},
		methods:{
			navTo(url){
				uni.navigateTo({
					url:url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.header {
		width: 100%;
		height: 606rpx;
		background: linear-gradient(180deg, #3DA4FE 0%, #3587F7 74%, rgba(45, 123, 247, 0) 100%);
	}
	
	.container {
		margin-top: -460rpx;
		.transBox {
			width: 694rpx;
			height: 318rpx;
			background: #FFFFFF;
			border-radius: 16rpx;
			margin: 0 auto;
			padding: 0 20rpx;
			.trans{
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 24rpx 0;
				.left{
					width: 96%;
					.left-item{
						display: flex;
						align-items: center;
						.info {
							width: 70%;
							display: flex;
							align-items: center;
							.sort {
								width: 32rpx;
								height: 32rpx;
								background: #3587F7;
								border-radius: 4rpx;
								font-size: 24rpx;
								font-family: Segoe UI;
								font-weight: 400;
								color: #FFFFFF;
								text-align: center;
							}
							.date{
								margin-left: 16rpx;
							}
							.address {
								margin-left: 16rpx;
							}
							.date,
							.address{
								font-size: 28rpx;
								font-family: Arial;
								font-weight: bold;
								color: #333333;
							}
						}
						.price {
							width: 30%;
							font-size: 24rpx;
							font-family: Segoe UI;
							font-weight: 400;
							color: #666666;
							text-align: right;
							padding-right: 8rpx;
						}
					}
				}
				.right {
					width: 4%;
				}
			}
			.line {
				width: 100%;
				height: 0rpx;
				border: 2rpx dotted #F2F2F7;
			}
			.tip {
				width: 100%;
				height: 62rpx;
				font-size: 24rpx;
				font-family: Segoe UI;
				font-weight: 400;
				line-height: 62rpx;
				color: #FE8C16;
				text-align: center;
			}
			.tip1 {
				width: 656rpx;
				height: 94rpx;
				background: #FEF7EF;
				border-radius: 16rpx;
				font-size: 24rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #666666;
				padding: 12rpx;
			}
		}
	
		.passer {
			margin: 20rpx auto 0;
			width: 694rpx;
			height: auto;
			background-color: #FFFFFF;
			border-radius: 16rpx;
			overflow: hidden;
			.passer-ul {
				padding: 0 20rpx;
				.passer-li {
					width: 100%;
					height: 140rpx;
					display: flex;
					align-items: center;
					border-bottom: 2rpx solid #F2F2F7;
					.peoInfo {
						margin-left: 12rpx;
						.name {
							display: flex;
							align-items: center;
							.name-tit {
								font-size: 32rpx;
								font-family: Segoe UI;
								font-weight: bold;
								color: #333333;
							}
							.type {
								margin-left: 10rpx;
								width: fit-content;
								height: 38rpx;
								background: #FFFFFF;
								border: 2rpx solid #D0D2D5;
								border-radius: 4rpx;
								font-size: 20rpx;
								font-family: Segoe UI;
								font-weight: 400;
								color: #999999;
								text-align: center;
								padding: 0 10rpx;
							}
						}
						.idnum {
							margin-top: 6rpx;
							font-size: 24rpx;
							font-family: Segoe UI;
							font-weight: 400;
							color: #999999;
						}
					}
				}
			}
			.addpasser {
				width: 694rpx;
				height: 100rpx;
				background: #FFFFFF;
				border-radius: 16rpx;
				text-align: center;
				line-height: 100rpx;
				font-size: 32rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #3587F7;
			}
		}
	
		.inputBox {
			margin: 20rpx auto 0;
			width: 694rpx;
			height: 100rpx;
			background: #FFFFFF;
			border-radius: 16rpx;
			display: flex;
			align-items: center;
			padding: 0 20rpx;
			.label {
				font-size: 32rpx;
				font-family: Segoe UI;
				font-weight: bold;
				line-height: 19px;
				color: #333333;
			}
			.input {
				margin-left: 26rpx;
				display: flex;
				align-items: center;
				text {
					font-size: 28rpx;
					font-family: Segoe UI;
					font-weight: 400;
					color: #333333;
				}
				input {
					font-size: 28rpx;
					font-family: Segoe UI;
					font-weight: 400;
					color: #333333;
					text-indent: 10rpx;
				}
			}
			.right {
				margin-left: auto;
				image {
					width: 36rpx;
					height: 36rpx;
					vertical-align: middle;
				}
			}
		}
	
		.trainTip {
			font-size: 20rpx;
			font-family: Segoe UI;
			font-weight: 400;
			color: #999999;
			width: 100%;
			padding-left: 28rpx;
			margin-top: 20rpx;
		}
	}
	
	.reserve {
		width: 100%;
		height: 112rpx;
		background: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		bottom: 0;
		.btn {
			width: 694rpx;
			height: 80rpx;
			background: linear-gradient(180deg, #FEA837 0%, #FF7700 100%);
			border-radius: 8rpx;
			font-size: 32rpx;
			font-family: Segoe UI;
			font-weight: 400;
			line-height: 80rpx;
			color: #FFFFFF;
			text-align: center;
		}
	}

	.transPop {
		width: 660rpx;
		height: 500rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		padding: 0 20rpx;
		.top{
			width: 100%;
			height: 100rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.left {
				font-size: 24rpx;
				font-family: Segoe UI;
				font-weight: bold;
				color: #333333;
			}
			.right {
				font-size: 24rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #999999;
			}
		}
		.trans-li {
			width: 620rpx;
			height: 156rpx;
			background: #F7F8FA;
			border-radius: 8rpx;
			display: flex;
			align-items: center;
			padding: 0 20rpx;
			.step {
				width: 32rpx;
				height: 32rpx;
				background: #3587F7;
				border-radius: 4rpx;
				font-size: 24rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #FFFFFF;
				text-align: center;
			}
			.dra {
				margin-left: 20rpx;
			}
			.ari {
				text-align: right;
			}
			.dra,
			.ari {
				display: flex;
				flex-direction: column;
				.date {
					font-size: 24rpx;
					font-family: Segoe UI;
					font-weight: 400;
					color: #333333;
				}
				.time {
					font-size: 36rpx;
					font-family: Alibaba Sans;
					font-weight: bold;
					color: #333333;
				}
				.station {
					font-size: 24rpx;
					font-family: Segoe UI;
					font-weight: 400;
					color: #333333;
				}
			}
			.mid {
				display: flex;
				flex-direction: column;
				font-size: 20rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #666666;
				margin: 0 80rpx;
				image {
					width: 108rpx;
					height: 6rpx;
					margin: 6rpx 0;
				}
			}
		}
		.trans-text {
			width: 660rpx;
			height: 64rpx;
			line-height: 64rpx;
			font-size: 24rpx;
			font-family: Segoe UI;
			font-weight: 400;
			color: #5E75AD;
			text-align: center;
		}
	}
	
	.seatPop {
		padding: 0 28rpx;
		.title {
			width: 100%;
			height: 100rpx;
			font-size: 32rpx;
			font-family: Segoe UI;
			font-weight: bold;
			color: #333333;
			line-height: 100rpx;
			text-align: center;
			.sub {
				font-size: 28rpx;
				font-family: Segoe UI;
				font-weight: bold;
				color: #3587F7;
			}
		}
		.tip {
			width: 694rpx;
			height: 64rpx;
			background: #FEF7EF;
			border-radius: 16rpx;
			margin: 0 auto;
			font-size: 24rpx;
			font-family: Segoe UI;
			font-weight: 400;
			line-height: 64rpx;
			color: #DF9341;
			text-align: center;
		}
		.route {
			.label {
				font-size: 28rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #333333;
				margin: 15rpx 0;
			}
			.route-item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin: 20rpx 0;
				.tipBox {
					width: 40rpx;
					height: 72rpx;
					background: #F3F6FB;
					border-radius: 8rpx;
					font-size: 24rpx;
					font-family: Segoe UI;
					font-weight: 400;
					color: #999999;
					text-align: center;
				}
				.seat {
					width: 60rpx;
					height: 56rpx;
					background: #FFFFFF;
					line-height: 56rpx;
					text-align: center;
					font-size: 24rpx;
					font-family: Segoe UI;
					font-weight: 400;
					color: #FFFFFF;
					background-image: url(../../../static/imgs/seat.png);
					background-repeat: no-repeat;
					background-size: 100% 100%;
				}
			}
		}
		
	}
	
</style>
